<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html >
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"> 

<ui:composition>
<div class="row-fluid" style="background: #FFFFFF;">
	<div class="span1"></div>
	<div class="span10">
		<h3>Cadastro de Cliente</h3>
		<br />
		
		<h:form prependId="false" id="formCadCli">
		<p:growl id="growl" sticky="true" showDetail="true" />
			<div class="span12">
				<div class="span3">
					<h:outputLabel for="nome" value="Nome Completo: *" />
				</div>
				<div class="span5">
					<p:inputText id="nome" value="#{clienteBean.cliente.nome}" required="false" label="Nome Completo" />
				</div>
				<div class="span2"></div>
			</div>
			<div class="span12">
				<div class="span3">
					<h:outputLabel for="telefone" value="Telefone: *" />
				</div>
				<div class="span5">
					<p:inputText id="telefone" value="#{clienteBean.cliente.telefone}" required="false" label="Telefone" />	
				</div>
				<div class="span2"></div>
			</div>
			<div class="span12">
				<div class="span3">
					<h:outputLabel for="rua" value="Rua: *" />
				</div>
				<div class="span5">
					<p:inputText id="rua" value="#{clienteBean.cliente.rua}" required="false" label="Rua" />	
				</div>
				<div class="span2"></div>
			</div>
			<div class="span12">
				<div class="span3">
					<h:outputLabel for="email" value="Email: *" />
				</div>
				<div class="span5">
					<p:inputText id="email" value="#{clienteBean.cliente.email}" required="false" label="Email"/>	
				</div>
				<div class="span2"></div>
			</div>
			<div class="span12">
				<div class="span3">
					<h:outputLabel for="funcao" value="Função: *" />
				</div>
				<div class="span5">
					<p:inputText id="funcao" value="#{clienteBean.cliente.funcao}" required="false" label="Função" />	
				</div>
				<div class="span2"></div>
			</div>
			<div class="span12">
				<div class="span3">
					<h:outputLabel for="codCarteira" value="Codigo Carteira: *" />
				</div>
				<div class="span5">
					<p:inputText id="codCarteira" value="#{clienteBean.cliente.codCarteira}" required="false" label="Codigo Carteira" />	
				</div>
				<div class="span2"></div>
			</div>		
			<div class="span12">
				<div class="span3">
					<p:commandButton id="btSalvar" value="Salvar" ajax="true" actionListener="#{clienteBean.salvarCliente()}" icon="ui-icon-check" update=":formCadCli" style="margin:0; margin-top:15px;" />
				</div>
				<div class="span3">
					<p:commandButton id="btCancelar" value="Cancelar" action="#{clienteBean.cancelar()}" icon="ui-icon-check" style="margin:0; margin-left:10px; margin-top:15px;" />
				</div>
			</div>
			<div class="span12"></div>
			<div class="span12"></div>
		</h:form>
	</div>
	<div class="span1"></div>
</div>
</ui:composition>
</html>